<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>22-Vue双向绑定</title>
    <!--②需求2:将选中的多选框中的值,动态显示到span中-->
</head>
<body>
<div id="app">

    爱好1:<input type="checkbox" value="javase" v-model="hobbys"><br>
    爱好2:<input type="checkbox" value="javame" v-model="hobbys"><br>
    爱好3:<input type="checkbox" value="javaee" v-model="hobbys"><br>

    已选中的爱好:
    <span>{{hobbys}}</span>

</div>

</body>
<script src="js/vue.js"></script>
<script>

    var vue = new Vue({
        el: "#app",
        data: {
            hobbys:[
                "javase",
                "javaee"
            ]

        },
        methods: {

        }
    })

</script>
</html>